<template>
    <div>
        <el-menu :default-active="onRouters" class="el-menu-demo" mode="horizontal" @select="handleSelect" router>
            <el-menu-item index="/home/userPane" >用户管理</el-menu-item>
            <el-menu-item index="/home/configPane" >配置管理</el-menu-item>
            <el-menu-item index="3" >角色管理</el-menu-item>
            <el-menu-item index="4" >定时任务补偿</el-menu-item>
            <el-menu-item index="5"><a href="https://www.ele.me" target="_blank">订单管理</a></el-menu-item>
        </el-menu>

    </div>
</template>

<script>
    import userPane from './../content/user'
    import configPane from './../content/config'
    import rolePane from './../content/role'
    import schedulePane from './../content/schedule'

    export default {
        name: "pageHeader",
        components: {
            userPane,
            configPane,
            rolePane,
            schedulePane
        },
        data() {
            return {
            };
        },
        methods: {
            handleClick(tab, event) {
                console.log(tab, event);
                let v = this;
                v.$message.info("触发了click");
            },
            handleSelect(key, keyPath) {
                console.log(key, keyPath);
            },
            onRouters() {
                let router = this.$route.path;
                if (this.$route.path === 'index')
                    router = '/my_scene';
                debugger;
                return router
            }
        }
    }
</script>

<style scoped>

</style>